/*    */ package eos.moe.dragoncore;
/*    */ 
/*    */ import java.io.IOException;
/*    */ import java.io.InputStream;
/*    */ import java.util.Map;
/*    */ import java.util.concurrent.ConcurrentHashMap;
/*    */ import java.util.concurrent.Future;
/*    */ import net.minecraft.client.Minecraft;
/*    */ import net.minecraft.client.resources.IResource;
/*    */ import net.minecraft.client.resources.IResourceManager;
/*    */ import net.minecraft.util.ResourceLocation;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class zf
/*    */ {
/* 18 */   public static zf w = new zf();
/*    */ 
/*    */   
/* 21 */   private Map<String, ko> q = new ConcurrentHashMap<>();
/* 22 */   private Map<String, Future<?>> g = new ConcurrentHashMap<>();
/*    */ 
/*    */   
/*    */   public void v(ko ko1, String str) {
/* 26 */     de.q.submit(() -> {
/*    */           try {
/*    */             IResourceManager iResourceManager = Minecraft.func_71410_x().func_110442_L();
/*    */             IResource iResource = iResourceManager.func_110536_a(new ResourceLocation("dragoncore", a));
/*    */             InputStream inputStream = iResource.func_110527_b();
/*    */             ko1.v(inputStream);
/* 32 */           } catch (IOException iOException) {
/*    */             iOException.printStackTrace();
/*    */           } 
/*    */         });
/*    */   }
/*    */   
/*    */   public ko v(String str) {
/* 39 */     if (!this.q.containsKey(str)) {
/*    */       
/* 41 */       ko ko = new ko();
/* 42 */       this.q.put(str, ko);
/*    */       
/* 44 */       Future<?> future = de.q.submit(() -> {
/*    */             try {
/*    */               IResourceManager iResourceManager = Minecraft.func_71410_x().func_110442_L();
/*    */               IResource iResource = iResourceManager.func_110536_a(new ResourceLocation("dragoncore", a));
/*    */               InputStream inputStream = iResource.func_110527_b();
/*    */               ko1.v(inputStream);
/* 50 */             } catch (IOException iOException) {
/*    */               iOException.printStackTrace();
/*    */             } 
/*    */           });
/* 54 */       this.g.put(str, future);
/*    */     } 
/*    */     
/* 57 */     return this.q.get(str);
/*    */   }
/*    */ 
/*    */   
/*    */   public void v(String str) {
/* 62 */     Future future = this.g.remove(str);
/* 63 */     if (future != null) {
/* 64 */       future.cancel(true);
/*    */     }
/* 66 */     ko ko = this.q.remove(str);
/* 67 */     if (ko != null) {
/* 68 */       ko.v();
/*    */     }
/*    */   }
/*    */ 
/*    */   
/*    */   public void v() {
/* 74 */     for (Future<?> future : this.g.values()) {
/* 75 */       future.cancel(true);
/*    */     }
/* 77 */     this.g.clear();
/*    */     
/* 79 */     for (ko ko : this.q.values()) {
/* 80 */       ko.v();
/*    */     }
/* 82 */     this.q.clear();
/*    */   }
/*    */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\zf.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */